package com.bite.deom;

public class Student {

    private String name;
    private int age;
    static String classroom = "115班";

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public static void write() {      //静态成员方法
        System.out.println("写作业......");
    }

    public String toString() {
        return "[ " + name +
                " " + age +
                " " + classroom +
                " ]";

    }

    public static void main1(String[] args) {
        Student student = new Student("小明",18);

        student.write();    //通过对象调用
        Student.write();    //直接类调用

    }

    public static void main(String[] args) {
        {
            int a = 10;
            System.out.println(a);
        }
    }

}
